package com.livs.mvp;

public class CounterPresenter {

    private CounterView view;
    private final CounterModel model;

    public CounterPresenter(CounterModel model) {
        this.model = model;
    }

    public void attachView(CounterView view) {
        this.view = view;
        view.refreshPage(model.getCount());
    }

    public void onIncreaseClicked() {
        model.increase();
        view.refreshPage(model.getCount());
    }
}
